package com.crm.controller;


import com.crm.common.result.AjaxResult;
import com.crm.domain.Position;
import com.crm.service.PositionService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Slf4j
@RestController
@RequestMapping("/system/post")
@RequiredArgsConstructor
public class PositionController {
    @Autowired
    private PositionService positionService;

    @GetMapping("/list")//获取岗位列表
    public AjaxResult pagelist(Integer pageNum, Integer pageSize ){
       List<Position> postList = positionService.pagelist(pageNum, pageSize);
        return AjaxResult.success(postList);
    }

}
